home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1994 / MacHack 1994.toast / MacHack™94 / Talks & Papers / Timothy Knox / yerk 3.66 / Float source / fp.ld < prev    next >
Text File  |  1994-06-24  |  1KB  |  49 lines

  1. \ Don't forget to use the latest FRONTEND and PATHLIST when compiling
  2. +docs
  3. 0 -> interpret  \ vector interpret to (intrp)
  4. 0 -> path
  5. Forget @sarray
  6.  
  7. // ::Float source:fltMem
  8. // ::Float source:fpCode
  9. // ::Float source:fArgs
  10. // ::Float source:fValue
  11.  
  12. \ a temporary fix for system 7.0.1's and 7.1's nasty habit of changing pack4 calls
  13. \  What this does is save a pristine image of the floating point code
  14. \  range that contains pack4 calls to a CODE resource of ID=5. StdSave
  15. \  is redefined in frontend and will restore this code ontop of any
  16. \  changes the system may have done at document save time. Likewise,
  17. \  the install module will do the same if you are creating a standalone
  18. \  application that might have corrupted code.
  19.  
  20. ' f> -> 'f>
  21. string data
  22. new: data
  23. : saveCode { \ codeHndl -- }
  24.     5 getres CODE -dup
  25.     IF call RmveResource THEN
  26.     'f> ' flt! over - put: data
  27.     data @ 'type CODE w 5 nullOsStr call addResource
  28.     5 getres CODE -> codeHndl
  29.     codeHndl w 16 call setResAttrs
  30.     codeHndl call ChangedResource
  31.     word0 call curResFile call UpdateResFile ;
  32.  
  33. saveCode forget data
  34.  
  35. // ::Float source:fpi/o
  36. // ::Float source:fInterpret
  37. // ::Float source:elCode
  38. // ::Float source:fpExtra
  39. // ::Float source:Float
  40.  
  41.  
  42. // ::System source:PathList
  43. // ::System source:FrontEnd
  44.  
  45. 1 beep 1 beep 1 beep 1 beep
  46. READFP
  47. save yerkFP.com
  48. Become yerk
  49.